import * as echarts from "echarts";
import { useEffect } from "react";

const Home = () => {
  useEffect(() => {
    const chartDom = document.getElementById("main");
    const myChart = echarts.init(chartDom);

    const option = {
      xAxis: {
        type: "category",
        data: ["Vue","angular","react"],
      },
      yAxis: {
        type: "value",
      },
      series: [
        {
          data: [120, 200, 150, ],
          type: "bar",
        },
      ],
    };

    option && myChart.setOption(option);
  }, []);
  return <div id="main" style={{ width: "600px", height: "400px" }}></div>;
};

export default Home;
